From bfcefcf3d7010cdc5af2e131f372b8d86a086638 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 17 Jul 2026 19:47:15 +0000 Subject: [PATCH] Create, document, index, and trigger ELO_RANKS_DAILY_KK_F --- db/schemas/lib/triggers/Makefile | 3 +- .../lib/triggers/create/biography_data.m4 | 73 +++++++ .../triggers/create/elo_ranks_daily_kk_f.m4 | 99 +++++++++ .../lib/triggers/drop/elo_ranks_daily_kk_f.m4 | 23 +++ db/schemas/sokwedb/indexes/Makefile | 2 +- .../indexes/create/elo_ranks_daily_kk_f.m4 | 49 +++++ .../indexes/drop/elo_ranks_daily_kk_f.m4 | 33 +++ db/schemas/sokwedb/tables/Makefile | 3 +- .../tables/create/elo_ranks_daily_kk_f.m4 | 38 ++++ doc/src/analyzed.m4 | 1 + doc/src/analyzed/elo_ranks_daily_kk_f.m4 | 190 ++++++++++++++++++ doc/src/epilog.inc.m4 | 27 +++ 12 files changed, 538 insertions(+), 3 deletions(-) create mode 100644 db/schemas/lib/triggers/create/elo_ranks_daily_kk_f.m4 create mode 100644 db/schemas/lib/triggers/drop/elo_ranks_daily_kk_f.m4 create mode 100644 db/schemas/sokwedb/indexes/create/elo_ranks_daily_kk_f.m4 create mode 100644 db/schemas/sokwedb/indexes/drop/elo_ranks_daily_kk_f.m4 create mode 100644 db/schemas/sokwedb/tables/create/elo_ranks_daily_kk_f.m4 create mode 100644 doc/src/analyzed/elo_ranks_daily_kk_f.m4 diff --git a/db/schemas/lib/triggers/Makefile b/db/schemas/lib/triggers/Makefile index 4714c9e..9ff08f6 100644 --- a/db/schemas/lib/triggers/Makefile +++ b/db/schemas/lib/triggers/Makefile @@ -51,7 +51,8 @@ ORDER := comm_ids \ pantgrunts_view \ brecord_notes \ colobus \ - matings + matings \ + elo_ranks_daily_kk_f DROP_EXISTING := true diff --git a/db/schemas/lib/triggers/create/biography_data.m4 b/db/schemas/lib/triggers/create/biography_data.m4 index ba9f366..36d4a87 100644 --- a/db/schemas/lib/triggers/create/biography_data.m4 +++ b/db/schemas/lib/triggers/create/biography_data.m4 @@ -1322,6 +1322,79 @@ CREATE OR REPLACE FUNCTION biography_data_func () END IF; END; END IF; + + + -- ELO_RANKS_DAILY_KK_F + -- The individual must be female to have a ranking + IF NEW.sex <>'sdb_female' AND + OLD.sex = 'sdb_female' THEN + DECLARE + a_id elo_ranks_daily_kk_f.id%TYPE; + a_date elo_ranks_daily_kk_f.date%TYPE; + a_individual elo_ranks_daily_kk_f.individual%TYPE; + a_elo elo_ranks_daily_kk_f.elo%TYPE; + a_eloordinal elo_ranks_daily_kk_f.eloordinal%TYPE; + a_eloscaled elo_ranks_daily_kk_f.eloscaled%TYPE; + a_expnumbeaten elo_ranks_daily_kk_f.expnumbeaten%TYPE; + a_elocardinal elo_ranks_daily_kk_f.elocardinal%TYPE; + a_jenkselocardinal elo_ranks_daily_kk_f.jenkselocardinal%TYPE; + + BEGIN + SELECT elo_ranks_daily_kk_f.id, elo_ranks_daily_kk_f.date + , elo_ranks_daily_kk_f.individual + , elo_ranks_daily_kk_f.elo + , elo_ranks_daily_kk_f.eloordinal + , elo_ranks_daily_kk_f.eloscaled + , elo_ranks_daily_kk_f.expnumbeaten + , elo_ranks_daily_kk_f.elocardinal + , elo_ranks_daily_kk_f.jenkselocardinal + INTO a_id , a_date + , a_individual + , a_elo + , a_eloordinal + , a_eloscaled + , a_expnumbeaten + , a_elocardinal + , a_jenkselocardinal + FROM elo_ranks_daily_kk_f + WHERE elo_ranks_daily_kk_f.individual = NEW.animid + -- Produce a consistent error message + ORDER BY elo_ranks_daily_kk_f.date; + + IF FOUND THEN + RAISE EXCEPTION integrity_constraint_violation USING + MESSAGE = 'Error on UPDATE of BIOGRAPHY_DATA' + , DETAIL = 'An individual cannot have ranks on' + || ' ELO_RANKS_DAILY_KK_F unless they are female' + || ': Key (AnimID) = (' + || NEW.animid + || '), Value (Sex) = (' + || NEW.sex + || '), Value (BirthDate) = (' + || NEW.birthdate + || ': Key (ELO_RANKS_DAILY_KK_F.ID) = (' + || a_id + || '), Value (ELO_RANKS_DAILY_KK_F.Date) = (' + || a_date + || '), Value (ELO_RANKS_DAILY_KK_F.Individual) = (' + || a_individual + || '), Value (ELO_RANKS_DAILY_KK_F.Elo) = (' + || a_elo + || '), Value (ELO_RANKS_DAILY_KK_F.EloOrdinal) = (' + || a_eloordinal + || '), Value (ELO_RANKS_DAILY_KK_F.EloScaled) = (' + || a_eloscaled + || '), Value (ELO_RANKS_DAILY_KK_F.ExpNumBeaten) = (' + || a_expnumbeaten + || '), Value (ELO_RANKS_DAILY_KK_F.EloCardinal) = (' + || a_elocardinal + || '), Value (ELO_RANKS_DAILY_KK_F.JenksEloCardinal' + || ') = (' + || a_jenkselocardinal + || ')'; + END IF; + END; + END IF; END IF; -- TG_OP = 'UPDATE' RETURN NULL; diff --git a/db/schemas/lib/triggers/create/elo_ranks_daily_kk_f.m4 b/db/schemas/lib/triggers/create/elo_ranks_daily_kk_f.m4 new file mode 100644 index 0000000..f8514a9 --- /dev/null +++ b/db/schemas/lib/triggers/create/elo_ranks_daily_kk_f.m4 @@ -0,0 +1,99 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc. http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify it +dnl under the terms of the GNU Affero General Public License as published by +dnl the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Triggers for the elo_ranks_daily_kk_f table +dnl +dnl Karl O. Pinc + +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`macros.m4')dnl + + +RAISE INFO 'elo_ranks_daily_kk_f_func'; +CREATE OR REPLACE FUNCTION elo_ranks_daily_kk_f_func () + RETURNS trigger + LANGUAGE plpgsql + sdb_function_set_search_path + AS $$ + BEGIN + -- Function for elo_ranks_daily_kk_f insert and update triggers + -- + -- AGPL_notice(` --', `2026', + `The Meme Factory, Inc., www.karlpinc.com') + + IF TG_OP = 'UPDATE' THEN + cannot_change(`ELO_RANKS_DAILY_KK_F', `ID') + END IF; + + IF TG_OP = 'INSERT' + OR NEW.individual <> OLD.individual THEN + -- The individual must be female. + DECLARE + -- BIOGRAPHY_DATA + a_sex biography_data.sex%TYPE; + a_birthdate biography_data.birthdate%TYPE; + + BEGIN + -- Get the data we need, and that needed for error message content too + SELECT biography_data.sex, biography_data.birthdate + INTO a_sex , a_birthdate + FROM biography_data + WHERE biography_data.animid = NEW.individual + AND biography_data.sex <> 'sdb_female'; + IF FOUND THEN + RAISE EXCEPTION integrity_constraint_violation USING + MESSAGE = 'Error on ' || TG_OP || ' of FERTILITY' + , DETAIL = 'The Individual must be a female' + || ': Key (ID) = (' + || NEW.id + || '): Value (Date) = (' + || NEW.date + || '): Value (Individual) = (' + || NEW.individual + || '): Value (Elo) = (' + || NEW.elo + || '): Value (EloOrdinal) = (' + || NEW.eloordinal + || '): Value (EloScaled) = (' + || NEW.eloscaled + || '): Value (ExpNumBeaten) = (' + || NEW.expnumbeaten + || '): Value (EloCardinal) = (' + || NEW.elocardinal + || '): Value (JenksEloCardinal) = (' + || NEW.jenkselocardinal + || '): Key (BIOGRAPHY_DATA.AnimID) = (' + || NEW.individual + || '), Value (BIOGRAPHY_DATA.Sex) = (' + || a_sex + || '): Value (BIOGRAPHY_DATA.BirthDate) = (' + || a_birthdate + || ')'; + END IF; + END; + END IF; + + RETURN NULL; + END; +$$; + + +RAISE INFO 'elo_ranks_daily_kk_f_trigger'; +CREATE TRIGGER elo_ranks_daily_kk_f_trigger + AFTER INSERT OR UPDATE + ON elo_ranks_daily_kk_f FOR EACH ROW + EXECUTE PROCEDURE elo_ranks_daily_kk_f_func(); diff --git a/db/schemas/lib/triggers/drop/elo_ranks_daily_kk_f.m4 b/db/schemas/lib/triggers/drop/elo_ranks_daily_kk_f.m4 new file mode 100644 index 0000000..510c713 --- /dev/null +++ b/db/schemas/lib/triggers/drop/elo_ranks_daily_kk_f.m4 @@ -0,0 +1,23 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc. http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published by +dnl the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Drop triggers for elo_ranks_daily_kk_f table +dnl +dnl Karl O. Pinc + +dnl m4 includes +include(`copyright.m4')dnl + +DROP FUNCTION IF EXISTS elo_ranks_daily_kk_f_func() CASCADE; diff --git a/db/schemas/sokwedb/indexes/Makefile b/db/schemas/sokwedb/indexes/Makefile index 2e09322..11c23ec 100644 --- a/db/schemas/sokwedb/indexes/Makefile +++ b/db/schemas/sokwedb/indexes/Makefile @@ -24,7 +24,7 @@ ORDER := biography_data biography_log comm_membs comm_memb_log \ swelling_sources swelling_states aggression_event_log sightings \ aggressions food_events groomings attendance \ arrivals_a species_present repro_states locations_utm \ - locations_paper colobus matings fertility + locations_paper colobus matings fertility elo_ranks_daily_kk_f ## ## CAUTION: This Makefile is not designed to be run directly. It is normally diff --git a/db/schemas/sokwedb/indexes/create/elo_ranks_daily_kk_f.m4 b/db/schemas/sokwedb/indexes/create/elo_ranks_daily_kk_f.m4 new file mode 100644 index 0000000..a5f8eb0 --- /dev/null +++ b/db/schemas/sokwedb/indexes/create/elo_ranks_daily_kk_f.m4 @@ -0,0 +1,49 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`indexmacros.m4')dnl + +CREATE UNIQUE INDEX IF NOT EXISTS + "On ELO_RANKS_DAILY_KK_F, Date + Individual must be unique" + ON elo_ranks_daily_kk_f + (date, individual); + +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_individual + ON elo_ranks_daily_kk_f + (individual); +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_elo + ON elo_ranks_daily_kk_f + (elo); +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_eloordinal + ON elo_ranks_daily_kk_f + (eloordinal); +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_eloscaled + ON elo_ranks_daily_kk_f + (eloscaled); +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_expnumbeaten + ON elo_ranks_daily_kk_f + (expnumbeaten); +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_elocardinal + ON elo_ranks_daily_kk_f + (elocardinal); +CREATE INDEX IF NOT EXISTS elo_ranks_daily_kk_f_jenkselocardinal + ON elo_ranks_daily_kk_f + (jenkselocardinal); diff --git a/db/schemas/sokwedb/indexes/drop/elo_ranks_daily_kk_f.m4 b/db/schemas/sokwedb/indexes/drop/elo_ranks_daily_kk_f.m4 new file mode 100644 index 0000000..c4a8fe0 --- /dev/null +++ b/db/schemas/sokwedb/indexes/drop/elo_ranks_daily_kk_f.m4 @@ -0,0 +1,33 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`indexmacros.m4')dnl + +DROP INDEX IF EXISTS + "On ELO_RANKS_DAILY_KK_F, Date + Individual must be unique"; + +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_individual; +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_elo; +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_eloordinal; +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_eloscaled; +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_expnumbeaten; +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_elocardinal; +DROP INDEX IF EXISTS elo_ranks_daily_kk_f_jenkselocardinal; diff --git a/db/schemas/sokwedb/tables/Makefile b/db/schemas/sokwedb/tables/Makefile index 98b498e..60d9253 100644 --- a/db/schemas/sokwedb/tables/Makefile +++ b/db/schemas/sokwedb/tables/Makefile @@ -50,7 +50,8 @@ ORDER := biography_data \ brecord_notes \ colobus \ matings \ - fertility + fertility \ + elo_ranks_daily_kk_f ## ## CAUTION: This Makefile is not designed to be run directly. It is normally ## invoked by another Makefile. diff --git a/db/schemas/sokwedb/tables/create/elo_ranks_daily_kk_f.m4 b/db/schemas/sokwedb/tables/create/elo_ranks_daily_kk_f.m4 new file mode 100644 index 0000000..a51271c --- /dev/null +++ b/db/schemas/sokwedb/tables/create/elo_ranks_daily_kk_f.m4 @@ -0,0 +1,38 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`tablemacros.m4')dnl +include(`grants.m4')dnl +dnl + +CREATE TABLE elo_ranks_daily_kk_f ( + key_column(`ELO_RANKS_DAILY_KK_F', `ID', `INTEGER') + ,date DATE NOT NULL + ,animid_type_column(`individual', `Individual', `NOT NULL') + ,elo DOUBLE PRECISION NOT NULL + ,eloordinal DOUBLE PRECISION NOT NULL + ,eloscaled DOUBLE PRECISION NOT NULL + ,expnumbeaten DOUBLE PRECISION NOT NULL + ,elocardinal DOUBLE PRECISION NOT NULL + ,jenkselocardinal TEXT NOT NULL +); + +grant_priv(`ELO_RANKS_DAILY_KK_F') diff --git a/doc/src/analyzed.m4 b/doc/src/analyzed.m4 index ad961e7..4b17bab 100644 --- a/doc/src/analyzed.m4 +++ b/doc/src/analyzed.m4 @@ -31,6 +31,7 @@ a rudimentary analytical process. .. toctree:: :maxdepth: 3 + analyzed/elo_ranks_daily_kk_f.rst analyzed/fertility.rst analyzed/repro_states.rst analyzed/swelling_states.rst diff --git a/doc/src/analyzed/elo_ranks_daily_kk_f.m4 b/doc/src/analyzed/elo_ranks_daily_kk_f.m4 new file mode 100644 index 0000000..88385db --- /dev/null +++ b/doc/src/analyzed/elo_ranks_daily_kk_f.m4 @@ -0,0 +1,190 @@ +.. Copyright (C) 2026 The Meme Factory, Inc. www.karlpinc.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +.. M4 setup +include(constants.m4)dnl +include(macros.m4)dnl +sdb_rst_quotes(`on')dnl +sdb_generated_rst()dnl + +.. _ELO_RANKS_DAILY_KK_F: + +ELO_RANKS_DAILY_KK_F +-------------------- + +.. |ELO_RANKS_DAILY_KK_F_summary| replace:: + Each row represents an `Elo ranking`_ of a female chimpanzee, on + the given date, within the ``KK`` community. + + +|ELO_RANKS_DAILY_KK_F_summary| +This table is generated using the EloOptimized_ package of the R_ +statstical computing project. +More information can be found on the EloOptimized_ website. + +The |ELO_RANKS_DAILY_KK_F.Individual| must be that of a female. +This means that the related |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.Sex| +value must be ``sdb_female``. + +The columns |ELO_RANKS_DAILY_KK_F.Elo|\ , +|ELO_RANKS_DAILY_KK_F.EloOrdinal|\ , |ELO_RANKS_DAILY_KK_F.EloScaled|\ , +|ELO_RANKS_DAILY_KK_F.ExpNumBeaten|\ , and +|ELO_RANKS_DAILY_KK_F.EloCardinal| are all standard +|double precision floating point number|\ s, +a very common computer representation of a +number that is used when non-integral, or very large or very small +values may be encountered. +As such, it has approximately 15 decimal digits of precision and +computations which use its value are inexact, but good enough because +15 decimal digits of precision are good enough. + +An individual can only have one ranking per day. +This means that the combination of |ELO_RANKS_DAILY_KK_F.Individual| +and |ELO_RANKS_DAILY_KK_F.Date| must be unique. + + +.. contents:: + :depth: 2 + + +.. _ELO_RANKS_DAILY_KK_F.ID: + +ID (IDentifier) +``````````````` + +.. |ELO_RANKS_DAILY_KK_F.ID_summary| replace:: + |idcol| + +|ELO_RANKS_DAILY_KK_F.ID_summary| +|notnull| + + +.. _ELO_RANKS_DAILY_KK_F.Date: + +Date +```` + +.. |ELO_RANKS_DAILY_KK_F.Date_summary| replace:: + The date the female was ranked. + +|ELO_RANKS_DAILY_KK_F.Date_summary| +|notnull| + + +.. _ELO_RANKS_DAILY_KK_F.Individual: + +Individual +`````````` + +.. |ELO_RANKS_DAILY_KK_F.Individual_summary| replace:: + The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| of the ranked female. + +|ELO_RANKS_DAILY_KK_F.Individual_summary| +|notnull| + + +.. _ELO_RANKS_DAILY_KK_F.Elo: + +Elo +``` + +.. |ELO_RANKS_DAILY_KK_F.Elo_summary| replace:: + The Elo ranking of the female. + +|ELO_RANKS_DAILY_KK_F.Elo_summary| +Relative Elo rank, calculated from starting value of best-fit model. +(Modeling starting values and k.) + +|notnull| + + +.. _ELO_RANKS_DAILY_KK_F.EloOrdinal: + +EloOrdinal +`````````` + +.. |ELO_RANKS_DAILY_KK_F.EloOrdinal_summary| replace:: + The ordinal ranking of the female. + +|ELO_RANKS_DAILY_KK_F.EloOrdinal_summary| +The ordinal rank number is based on the raw Elo scores of the +individuals ranked on this date, where ``1`` is the highest rank. + +|notnull| + + +.. _ELO_RANKS_DAILY_KK_F.EloScaled: + +EloScaled +````````` + +.. |ELO_RANKS_DAILY_KK_F.EloScaled_summary| replace:: + The scaled ranking of the female. + +|ELO_RANKS_DAILY_KK_F.EloScaled_summary| +The Elo score rescaled between 0 and 1 according to the formula:: + + ([individual Elo] + - min([daily Elo scores])/(max([daily Elo scores]) + - min([daily Elo scores])) + +|notnull| + + + +.. _ELO_RANKS_DAILY_KK_F.ExpNumBeaten: + +ExpNumBeaten +```````````` + +.. |ELO_RANKS_DAILY_KK_F.ExpNumBeaten_summary| replace:: + Expected number of individuals in the group beaten, calculated as + EloCardinal * number of individuals in group. + +|ELO_RANKS_DAILY_KK_F.ExpNumBeaten_summary| + +|notnull| + + + +.. _ELO_RANKS_DAILY_KK_F.EloCardinal: + +EloCardinal +``````````` + +.. |ELO_RANKS_DAILY_KK_F.EloCardinal_summary| replace:: + Another sort of ranking on a (unvalidated) zero to one scale. + +|ELO_RANKS_DAILY_KK_F.EloCardinal_summary| +Cardinal ranks following equation (4) in Foerster, Franz et al. 2016; +expected proportion of individuals dominated. + +|notnull| + + + +.. _ELO_RANKS_DAILY_KK_F.JenksEloCardinal: + +JenksEloCardinal +```````````````` + +.. |ELO_RANKS_DAILY_KK_F.JenksEloCardinal_summary| replace:: + Categories created by natural jenks algorithm, for each day, based + on the distribution of relative |ELO_RANKS_DAILY_KK_F.Elo| ranks. + +|ELO_RANKS_DAILY_KK_F.JenksEloCardinal_summary| +(The categories are not validated.) + +|notnull| diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index c1c0b25..e2082a1 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -49,6 +49,12 @@ sdb_generated_rst()dnl .. _Entity Relationship Diagrams: https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model +.. _R: https://r-project.org + +.. _EloOptimized: https://jtfeld.github.io/EloOptimized/ + +.. _Elo ranking: https://en.wikipedia.org/wiki/Elo_ranking + .. Table and column name substitutions, so we can add "extra comments" to the section heading and still get a link label with the name of the @@ -387,6 +393,27 @@ sdb_generated_rst()dnl .. |ED_CERTAINTIES.Code| replace:: :ref:`Code ` +.. |ELO_RANKS_DAILY_KK_F| replace:: + :ref:`ELO_RANKS_DAILY_KK_F ` +.. |ELO_RANKS_DAILY_KK_F.ID| replace:: + :ref:`ID ` +.. |ELO_RANKS_DAILY_KK_F.Date| replace:: + :ref:`Date ` +.. |ELO_RANKS_DAILY_KK_F.Individual| replace:: + :ref:`Individual ` +.. |ELO_RANKS_DAILY_KK_F.Elo| replace:: + :ref:`Elo ` +.. |ELO_RANKS_DAILY_KK_F.EloOrdinal| replace:: + :ref:`EloOrdinal ` +.. |ELO_RANKS_DAILY_KK_F.EloScaled| replace:: + :ref:`EloScaled ` +.. |ELO_RANKS_DAILY_KK_F.ExpNumBeaten| replace:: + :ref:`ExpNumBeaten ` +.. |ELO_RANKS_DAILY_KK_F.EloCardinal| replace:: + :ref:`EloCardinal ` +.. |ELO_RANKS_DAILY_KK_F.JenksEloCardinal| replace:: + :ref:`JenksEloCardinal ` + .. |ENTRYTYPES| replace:: :ref:`ENTRYTYPES ` .. |ENTRYTYPES.EntryType| replace:: :ref:`EntryType ` -- 2.34.1